package com.lebang.feign.bus;

import com.lebang.feign.bus.fallback.MemberBussRouteplanningRecordFallback;
import com.lebang.model.RequestUserInfo;
import com.lebangweb.response.JsonData;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ljx
 */
@FeignClient(name = "wangzhuan-bus", contextId = "wangzhuan-bus-routeplanning", fallback = MemberBussRouteplanningRecordFallback.class)
public interface MemberBussRouteplanningRecordFeign {

    @ApiOperation("添加车站站地点记录")
    @PostMapping("/buss/routeplanning/get")
    JsonData get(@RequestBody RequestUserInfo request, @ApiParam(name = "城市id") @RequestParam("cityId") String cityId);

    @ApiOperation("添加车站站地点记录")
    @PostMapping("/buss/routeplanning/add")
    JsonData add(@RequestBody RequestUserInfo request,
                 @RequestParam("starRoute")String starRoute,
                 @RequestParam("endRoute")String endRoute,
                 @ApiParam(name = "城市id") @RequestParam("cityId") String cityId);

    @ApiOperation("删除车站站地点记录")
    @PostMapping("/buss/routeplanning/del")
    JsonData del(@RequestBody RequestUserInfo request, @RequestParam String uuId) ;

    @ApiOperation("删除所有车站站地点记录")
    @PostMapping("/buss/routeplanning/delall")
    JsonData delall(@RequestBody RequestUserInfo request,
                           @ApiParam(name = "城市id") @RequestParam("cityId") String cityId);
}
